package com.heima.demo;

import java.io.IOException;
import java.io.OutputStream;
import java.io.PipedWriter;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;

public class TCP {
    public static void main(String[] args) throws IOException {
        //创建对象
        Socket s =new Socket(InetAddress.getByName("192.168.32.76"),10000);
        //获取流管道
        OutputStream os= s.getOutputStream();
        PrintWriter pw =new PrintWriter(os,true);
        pw.print("你好啊大姐姐");
        pw.close();
        s.close();
    }
}
